<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Yui2Yii Demo Application',
    'defaultController'=>'widget',
    'language'=>'ru',
    
	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
                'application.extensions.yui.*',       // YUI appended
	),
        'controllerMap'=>array(
                'yui'=>'application.extensions.yui.YuiController',  // YUI appended
        ),

	// application components
	'components'=>array(
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
			),
		),
		'user'=>array(
			// enable cookie-based authentication
			'allowAutoLogin'=>true,
		),
                'urlManager'=>array(
                            'urlFormat'=>'path',
                            'showScriptName' => false,
                            'urlSuffix' => '.html',
                ),
                'db'=>array(
                    'connectionString'=>'mysql:dbname=demoyui;host=localhost',
                    'username'=>'root',
                    'password'=>'qazwsx',
                    'charset'=>'utf8',
                ),
	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'adminEmail'=>'webmaster@example.com',
	),
);